<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>商品管理</title>
    <%@include file="/WEB-INF/views/commons/commons.jsp" %>
    <script type="text/javascript" src="/static/js/system/product.js"></script>
    <script type="text/javascript">
    </script>
</head>
<body>
<body>
<form id="info_form" method="post"   align="center" style="margin-left: 30px;margin-top: 15px;margin-bottom: 15px">
    <table>
        <tr>
            <td>
                <div id="p" class="easyui-panel" style=" background-color: darkgray;width:300px;height:150px; margin-top: 5px">
                    <p style="font-size:14px">共有商品</p>
                    <p style="font-size:30px ;" align="center"><span style="color: darkviolet"><i
                            id="totalProduct">0</i>种</span></p>
                </div>
            </td>
            <td>
                <div class="easyui-panel" style="background-color: darkgray;width:300px;height:150px; margin-top: 5px;margin-left: 20px;">
                    <p style="font-size:14px">商品均价</p>
                    <p style="font-size:30px ;" align="center"><span style="color: darkviolet"><i
                            id="avgPrice">0</i>元</span></p>
                </div>
            </td>
            <td>
                <div class="easyui-panel" style="background-color: red; width:300px;height:150px;margin-top: 5px;margin-left: 20px;">
                    <p style="font-size:14px">库存低于</p>
                    <p style="color: darkorange;font-size:25px" align="center"><span><i>10</i></span>件 </p>
                    <p>的有<span style="color: darkorange" align="center"><i id="lessProduct">4</i>件</span>商品</p>
                    <a onclick="warn()" style="background-color: #f4e039;margin: 50px 0px  0px 220px;">点击查看</a>
                    <!--margin:设置边缘,上下左右 -->
                </div>
            </td>
            <td>
                <div class="easyui-panel" style=" background-color: red; width:300px;height:150px;margin-top: 5px;margin-left: 20px;">
                    <p style="font-size:14px">最优选</p>
                    <p style="font-size:15px ;" align="center"><span style="color: darkviolet"><i
                            id="maxPrice">0</i></span>元</p>
                    <p style="font-size:20px ;" align="center"><span style="color: darkviolet"><i id="maxName">薏丝琳 M8</i></span></p>
                </div>
            </td>
        </tr>
    </table>
</form>
<div style="width: 100%; height:59%">
    <table id="product_datagrid"></table>
</div>
<!-- 表格顶部工具栏 -->
<div id="tb">
    <a href="#" class="easyui-linkbutton"
       data-options="iconCls:'icon-add',plain:true" data-cmd="add">新增商品</a> <a
        href="#" class="easyui-linkbutton"
        data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">修改商品</a>
    <a href="#" class="easyui-linkbutton"
       data-options="iconCls:'icon-reload',plain:true" data-cmd="remove">删除商品</a>
    <a href="#" class="easyui-linkbutton"
       data-options="iconCls:'icon-remove',plain:true" data-cmd="reload" >刷新商品</a>


    <input class="easyui-textbox" name="keyword" id="keyword" prompt="输入商品名称.编码">
    <input type="text" class="easyui-combobox" name="productCategoryOneId" id="productCategoryOneId"
           data-options="url:'/productCategory/list',valueField:'id',textField:'name',panelHeight:'auto',"
           prompt="选择一级分类">
    <input type="text" class="easyui-combobox" name="productSortTwoId" id="productCategoryTwoId"
           data-options="valueField:'id',textField:'name',panelHeight:'auto'," prompt="选择二级分类">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true"
       data-cmd="query">搜索</a>
</div>
<!-- 商品新增或编辑 -->
<div id="product_dialog">
    <form id="product_form" method="post" style="padding:30px 0px 0px 20px;">
        <input type="hidden" id="productId" name="id">
        <table align="center" style="border-collapse: separate; border-spacing: 7px">
            <tr>
                <td>一级分类</td>
                <td>
                    <input id="productCategory1Id" name="productCategory1.id" class="easyui-combobox" type="text"
                           data-options="url:'/productCategory/list',textField:'name',valueField:'id',panelHeight:'auto'"
                           prompt="请输入一级分类">
                </td>
                <td>二级分类</td>
                <td><input id="productCategory2Id" class="easyui-combobox" name="productCategory2.id" type="text"
                           data-options="textField:'name',valueField:'id',panelHeight:'auto'" prompt="输入二级分类">
                </td>
            </tr>
            <tr>
                <td>商品名称</td>
                <td>
                    <input name="name" class="easyui-textbox" type="text"  prompt="请输入用户名">
                </td>
                <td>商品编码</td>
                <td><input class="easyui-textbox" name="sn" prompt="输入编码">
                </td>
            </tr>
            <tr>
                <td>商品品牌</td>
                <td><input class="easyui-textbox" name="brandName" prompt="输入品牌">
                </td>
                <td>商品货号</td>
                <td><input class="easyui-textbox" name="braCode" prompt="输入货号">
                </td>
            </tr>
            <td>商品进价</td>
            <td><input class="easyui-textbox" name="costPrice" prompt="输入进价"/>

            <td>商品单位</td>
            <td><input class="easyui-combobox" name="unit" id="product_unit" prompt="输入单位"
                       data-options="data:[{'value':'箱','text':'箱'},
                {'value':'件','text':'件'},{'value':'条','text':'条'},
                {'value':'包','text':'包'},{'value':'个','text':'个'}
                ],
                valueField:'value',
                textField:'text',panelHeight:'auto'"
            >
            </td>
            <tr>
                <td>销售单价</td>
                <td><input class="easyui-textbox" name="unitPrice"  prompt="输入单价"></td>

                <td>会员售价</td>
                <td><input class="easyui-textbox" name="vipPrice" prompt="输入会员价"></td>

            </tr>
            <tr>
                <td>商品提成</td>
                <td><input class="easyui-textbox" name="commissionRatio" prompt="输入提成"></td>

                <td>备注信息</td>
                <td><input class="easyui-textbox" name="remark" prompt="备注最多50字"></td>
            </tr>
            <tr>
                <td>过期时间</td>
                <td><input class="easyui-datebox" name="expirationDate" prompt="输入过期时间"></td>
            </tr>
        </table>
    </form>
</div>
<!-- 新增编辑底部按钮 -->
<div id="bb">
    <a href="#" class="easyui-linkbutton"
       data-options="iconCls:'icon-save',plain:true" data-cmd="save">保存</a> <a
        href="#" class="easyui-linkbutton"
        data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel">取消</a>
</div>
</body>
</html>